package com.zmn.oms.persistence.interfaces.acceptance;

import com.zmn.oms.model.entity.acceptance.OrderWorkAcceptance;
import com.zmn.oms.model.entity.acceptance.OrderWorkAcceptanceDbQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderWorkAcceptanceDao {

    int insertSelective(OrderWorkAcceptance orderWorkAcceptance);

    /**
     * 根据查询条件查询订单验收数量
     * @param orderWorkAcceptanceDbQuery
     * @return
     */
    int countOrderWorkAcceptanceByQuery(OrderWorkAcceptanceDbQuery orderWorkAcceptanceDbQuery);

    OrderWorkAcceptance selectByPrimaryKey(@Param("acceptanceId") Long acceptanceId, @Param("orderId") Long orderId);

    OrderWorkAcceptance findOrderWorkAcceptanceByQuery(OrderWorkAcceptanceDbQuery orderWorkAcceptanceDbQuery);

    /**
     * 根据查询条件查询多个订单验收
     * @param orderWorkAcceptanceDbQuery
     * @return
     */
    List<OrderWorkAcceptance> listOrderWorkAcceptanceByQuery(OrderWorkAcceptanceDbQuery orderWorkAcceptanceDbQuery);

    int updateByPrimaryKeySelective(OrderWorkAcceptance orderWorkAcceptance);

    int updateOrderWorkConfirmAcceptance(OrderWorkAcceptance orderWorkAcceptance);

    List<OrderWorkAcceptance> listOrderWorkAcceptanceByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

    int deleteOrderWorkAcceptanceByOrderId(@Param("orderId") Long orderId);

    int deleteAcceptanceBykey(@Param("orderId") Long orderId, @Param("acceptanceId") Long acceptanceId);
}